﻿using Aspose.Cells;
using CommonLib;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace 电脑信息采集台账导出
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            new ExtUrl();

            if (!File.Exists("data.xlsx"))
            {
                using (Workbook book =new Workbook())
                {
                    using (Worksheet sh = book.Worksheets[0])
                    {
                        sh.Cells[0, 0].PutValue("使用部门");
                        sh.Cells[0, 1].PutValue("房间号");
                        sh.Cells[0, 2].PutValue("姓名");
                        sh.Cells[0, 3].PutValue("备注");
                        sh.Cells[0, 4].PutValue("计算机类型");
                        sh.Cells[0, 5].PutValue("网络类型");
                        sh.Cells[0, 6].PutValue("IP地址");
                        sh.Cells[0, 7].PutValue("Mac地址");
                        sh.Cells[0, 8].PutValue("操作系统");
                        sh.Cells[0, 9].PutValue("OEM");
                        sh.Cells[0, 10].PutValue("办公软件");
                        sh.Cells[0, 11].PutValue("设计软件");
                        sh.Cells[0, 12].PutValue("杀毒软件");
                        sh.Cells[0, 13].PutValue("操作系统安装时间");

                        book.Save("data.xlsx", SaveFormat.Xlsx);
                    }

                }
            }
        }
    }
}
